package com.qingcheng.controller;

import com.qingcheng.entity.Result;
import com.qingcheng.pojo.order.Order;
import com.qingcheng.pojo.order.OrderConfig;
import com.qingcheng.service.OrderConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/orderConfig")
public class OrderConfigController {

    @Autowired
    private OrderConfigService orderConfigService;


    @GetMapping("/findAll")
    public List<OrderConfig> findAll(){
        return orderConfigService.findAll();
    }

    @PostMapping("/update")
    public Result update(@RequestBody OrderConfig order){
        orderConfigService.update(order);
        return new Result(200,"修改成功",null);
    }

}
